/*
 * To change this license header, choose License Headers in Project Properties.
 * To change this template file, choose Tools | Templates
 * and open the template in the editor.
 */

package run;

import core.ResearchCore;
import core.SellerCore;
import core.StepOwnerCore;
import java.util.HashMap;
import java.util.Set;
import model.Costumer;
import model.Dapcomposition;
import model.Dapstructure;
import model.Dapversion;
import model.Employee;
import model.Product;
import model.Seller;
import org.hibernate.Session;
import org.hibernate.Transaction;

/**
 *
 * @author phinguyen
 */
public class TestHQL {

    /**
     * @param args the command line arguments
     */
    public static void main(String[] args) {
        /**StepOwnerCore core = new StepOwnerCore();
        String varemail = null;
        for (String string : core.getAllEmailEmployee()) {
            System.out.println(" email : " + string);
            varemail = string;
        }
        System.out.println(core.getEmployeeByMail(varemail).toString());
        
        for (Employee string : core.getAllEmployeesOfDepartment(core.researchDepartmentByName("FINANCE"))) {
            System.out.println(" - " + string.getEfirstname() + " " +string.getEname());
        }
        */
           

        
            
//        HashMap<Product,Integer> hash= new HashMap<Product,Integer>();
//        
//        String sname ="regt";
//        
//        Product prod = score.getProductbyID(6);
//        hash.put(prod,16);
//        Seller seller = score.createTestSeller();
//        String title ="DAP n°zejrhzrkezk";
//        Costumer customer = score.createCustomer(sname, sname, sname);
//        score.createDAP(hash,customer, title, seller);
//        SellerCore score = new SellerCore();
//        Seller seller = new Seller();
//        seller = score.getSellerbyID(1);
//        for (Dapversion dap : score.dAPsInProgress(seller)){
//            System.out.println(dap.getDvidvtitle());
//                    }
//        abc
//        SellerCore core = new SellerCore();
//        for (Dapstructure string : core.getAllDapstructure()) {
//            System.out.println("dapstructure : " + string.toString());
//        }
//        System.out.println("Dap structure courante : " + core.getCurrentDapStructure().toString());
//        
        StepOwnerCore core = new StepOwnerCore();
//        System.out.println("Documents attachés : " + core.getAllDocversionForDecision(core.getDecisionById(new Integer("1"))));
        
        
        System.out.println("test : "+core.getAllDapcompositionForDecision(core.getDecisionById(32)));
    }
}
